<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: trnorm</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: trnorm</td>
      <td class="subheader-left"><a href="matlab:open trnorm">View code for trnorm</a></td>
    </tr>
  </table>
<h1>trnorm</h1><p><span class="helptopic">Normalize a rotation matrix</span></p><p>
<strong>rn</strong> = <span style="color:red">trnorm</span>(<strong>R</strong>) is guaranteed to be a proper orthogonal matrix rotation
matrix (3x3) which is "close" to the non-orthogonal matrix <strong>R</strong> (3x3). If <strong>R</strong>
= [N,O,A] the O and A vectors are made unit length and the normal vector
is formed from N = O x A, and then we ensure that O and A are orthogonal
by O = A x N.

</p>
<p>
<strong>tn</strong> = <span style="color:red">trnorm</span>(<strong>T</strong>) as above but the rotational submatrix of the homogeneous
transformation <strong>T</strong> (4x4) is normalised while the translational part is
passed unchanged.

</p>
<p>
If <strong>R</strong> (3x3xK) or <strong>T</strong> (4x4xK) represent a sequence then <strong>rn</strong> and <strong>tn</strong> have the
same dimension and normalisation is performed on each plane.

</p>
<h2>Notes</h2>
<ul>
  <li>Only the direction of A (the z-axis) is unchanged.</li>
  <li>Used to prevent finite word length arithmetic causing transforms to
become `unnormalized'.</li>
</ul>
<h2>See also</h2>
<p>
<a href="oa2tr.html">oa2tr</a>, <a href="SO3.trnorm.html">SO3.trnorm</a>, <a href="SE3.trnorm.html">SE3.trnorm</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>